#!/usr/bin/env node

const arg=process.argv[2];

if(3 !== process.argv.length){
  console.log('请输入正确的base64编码');
}

const buf=Buffer.from(arg,'base64');

//1.
//const usr_pwd=buf.toString('utf8');
//console.log(`usr:${usr_pwd.split(':')[0]}\npasswd:${usr_pwd.split(':')[1]}`);

//2.
const usr_pwd=buf.toString('utf8').split(':');
console.log(`usr:${usr_pwd[0]}\npasswd:${usr_pwd[1]}`);
